/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { responseSuccess, ResponseItem } from '../utils';
import Mock from 'mockjs';

export default {
  'POST /wkd/Blacklist/add': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /wkd/Blacklist/lists': (req: Request, res: Response) => {
    const data = Mock.mock({
      'list|1-30': [
        {
          'id|1-9999': 9999,
          username: Mock.mock('@id()'),
          intercept_brand: ['yjkd'],
          remark: Mock.mock('@csentence(3, 20)'),
          operate_at: Mock.mock('@now()'),
          channel: 'mina',
        },
      ],
    });
    const result: ResponseItem = {
      code: 0,
      msg: 'success',
      data: data.list,
    };
    return res.json(result);
  },
  'POST /wkd/Blacklist/getBrandList': (req: Request, res: Response) => {
    return res.json({
      code: 0,
      msg: 'success',
      data: [
        {
          brand: 'yjkd',
          order_type: 2,
          name: '申通优寄',
          nickname: '申通优寄（线上）',
        },
        {
          brand: 'jd',
          order_type: 3,
          name: '京东快递',
          nickname: '京东快递（线下）',
        },
        {
          brand: 'dp',
          order_type: 4,
          name: '德邦快递',
          nickname: '德邦快递（线下）',
        },
        {
          brand: 'jt',
          order_type: 5,
          name: '极兔快递',
          nickname: '极兔快递（线上）',
        },
        {
          brand: 'yyj',
          order_type: 6,
          name: '驿优寄',
          nickname: '驿优寄（线下）',
        },
        {
          brand: 'yd',
          order_type: 8,
          name: '韵达快递',
          nickname: '韵达快递（线下）',
        },
        {
          brand: 'ztyj',
          order_type: 9,
          name: '中通优寄',
          nickname: '中通优寄（线上）',
        },
        {
          brand: 'yhj',
          order_type: 10,
          name: '商家优惠寄',
          nickname: '商家优惠寄（线上）',
        },
        {
          brand: 'sfyj',
          order_type: 11,
          name: '棒棒达',
          nickname: '棒棒达（线上）',
        },
        {
          brand: 'jdyj',
          order_type: 12,
          name: '京东优寄',
          nickname: '京东优寄（线上）',
        },
        {
          brand: 'ytyj',
          order_type: 13,
          name: '圆通优寄',
          nickname: '圆通优寄（线上）',
        },
        {
          brand: 'dpyj',
          order_type: 14,
          name: '德邦优寄',
          nickname: '德邦优寄（线上）',
        },
        {
          brand: 'yidasfyj',
          order_type: 15,
          name: '易达顺丰优寄',
          nickname: '易达顺丰优寄（线上）',
        },
        {
          brand: 'sfky',
          order_type: 16,
          name: '顺丰快运',
          nickname: '顺丰快运（线下）',
        },
        {
          brand: 'sf',
          order_type: 17,
          name: '顺丰速运',
          nickname: '顺丰速运（线下）',
        },
        {
          brand: 'yt',
          order_type: 18,
          name: '圆通快递',
          nickname: '圆通快递（线下）',
        },
        {
          brand: 'zt',
          order_type: 19,
          name: '中通快递',
          nickname: '中通快递（线下）',
        },
        {
          brand: 'sxjd',
          order_type: 20,
          name: '顺心捷达',
          nickname: '顺心捷达（线下）',
        },
      ],
    });
  },
  'POST /wkd/Blacklist/del': (req: Request, res: Response) => responseSuccess(req, res),
};
